<?php  
 
class Life extends Model {
// ������

    function __construct(){ 
       
      
    }
    
     
    function getPhotosDay($params = null){ 
    
    
       $modul_id = '';
       $section_id = '';
       $gallery_id = '';

       $modul_id = $params['modul_id'];
       $section_id = $params['section_id'];
       $gallery_id = $params['gallery_id'];

       $q = "SELECT * FROM photo WHERE modul_id = '$modul_id' 
                                    AND section_id = '$section_id'
                                    AND gallery_id = '$gallery_id'
                                    ORDER BY `sort` ASC
                                    ";
       $r = mysql_query($q);  
       if($r){     
          if( mysql_num_rows($r) > 0){
            while($row = mysql_fetch_assoc($r)){
                $tmp = $row;
                $tmp['link'] = "../Image/tour/{$tmp['link']}";
                $photos[] = $tmp;
            }          
          }
       }
       
       if(isset($photos))
       if(is_array($photos)){ //fb($photos);
          return $photos;
       }
       
       return false;
    }
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    
}

    
 
?>